package org.javaboy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

@Service
public class OrderService {


    @Autowired
    ApplicationContext applicationContext;

    public void orderList(){
        System.out.println("1.发布订购");

        OrderEvent orderEvent=new OrderEvent("nihao");
        applicationContext.publishEvent(orderEvent);
    }



}
